import service from "@/utils/request";
import type { GetAttrListParams, AttrList } from "./model/attrModel";
enum Api {
  getAttrListUrl = "/admin/product/attrInfoList",
  deleteAttrItemUrl = "/admin/product/deleteAttr",
}

export const getAttrListApi = ({
  cartgroy1Id,
  cartgroy2Id,
  cartgroy3Id,
}: GetAttrListParams) => {
  return service.get<any, AttrList>(
    Api.getAttrListUrl + `/${cartgroy1Id}/${cartgroy2Id}/${cartgroy3Id}`
  );
};

export const deleteAttrItemApi = (attrId: number) => {
  return service.delete<any, null>(Api.deleteAttrItemUrl + `/${attrId}`);
};
